@echo off

set app_bin_addr=0x10000
set boot_bin_addr=0x00000
set blank_bin_add0=0x7b000
set esp_init_data_bin_addr=0x7c000
set blank_bin_add1=0x7e000

set app_bin=../bin/eagle.irom0text.bin
set boot_bin=../bin/eagle.flash.bin
set blank_bin=../bin/blank.bin
set esp_init_data_bin=../bin/esp_init_data_default_v08.bin

esptool.py --port COM9 --baud 921600 write_flash %boot_bin_addr% %boot_bin% %app_bin_addr% %app_bin% %blank_bin_add0% %blank_bin% %esp_init_data_bin_addr% %esp_init_data_bin% %blank_bin_add1% %blank_bin%